//
//  StudentClassSureCell.m
//  CoachsBook
//
//  Created by MaBookPro on 2022/8/11.
//

#import "StudentClassSureCell.h"

@implementation StudentClassSureCell

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        [self creatcelllist];
    }
    return self;
}

-(void)creatcelllist{

    
    _cellbackV = [[UIView alloc]initWithFrame:CGRectMake(15, 0, APPwidth-30, 130)];
    _cellbackV.backgroundColor = rgba(245, 245, 250, 1);
    _cellbackV.userInteractionEnabled = YES;
    [self.contentView addSubview:_cellbackV];

    
    _nameLab = [[UILabel alloc]initWithFrame:CGRectMake(15, 15, _cellbackV.frame.size.width/2-50, 20)];
    _nameLab.text = @"学员:刘大少";
    _nameLab.textColor = rgba(51, 51, 51, 1);
    _nameLab.textAlignment = 0;
    _nameLab.font = [UIFont systemFontOfSize:16 weight:bold];
    [_cellbackV addSubview:_nameLab];
    
    
    _phoneBtn = [[UIButton alloc]initWithFrame:CGRectMake(_nameLab.frame.size.width+_nameLab.frame.origin.x+5,  15, _cellbackV.frame.size.width/2, 20)];
    [_phoneBtn setTitle:@"13117411248" forState:0] ;
    [_phoneBtn setTitleColor: rgba(22, 120, 255, 1) forState:0] ;
    _phoneBtn.titleLabel.textAlignment = 0;
    _phoneBtn.titleLabel.font = [UIFont systemFontOfSize:16];
    [_cellbackV addSubview:_phoneBtn];
    [_phoneBtn setImage:[UIImage imageNamed:@"phoneicon"] forState:0];
    _phoneBtn.imageEdgeInsets = UIEdgeInsetsMake(0, 150, 0, 0);
    _phoneBtn.titleEdgeInsets = UIEdgeInsetsMake(0, 0, 0, 30);
    [_phoneBtn.imageView setContentMode:UIViewContentModeScaleAspectFit];
    
    
     _disLab = [[UILabel alloc]initWithFrame:CGRectMake(15, _nameLab.frame.size.height + _nameLab.frame.origin.y+15, _cellbackV.frame.size.width-30, 15)];
    _disLab.text = @"练车申请:周五(7月22日)  晚上6:30-9:00  科目二";
    _disLab.textColor = rgba(153, 153, 153, 1);
    _disLab.textAlignment = 0;
    _disLab.font = [UIFont systemFontOfSize:12];
    [_cellbackV addSubview:_disLab];
    
    
    _rejectBtn = [[UIButton alloc]initWithFrame:CGRectMake(_cellbackV.frame.size.width/4-140/2, _disLab.frame.size.height+_disLab.frame.origin.y+20, 140, 35)];
    [_rejectBtn setTitle:@"拒绝" forState:0];
    _rejectBtn.titleLabel.textAlignment = 1;
    _rejectBtn.titleLabel.font = [UIFont systemFontOfSize:14];
    [_rejectBtn setTitleColor:rgba(22, 120, 255, 1) forState:0];
    _rejectBtn.layer.cornerRadius = 35/2;
    _rejectBtn.layer.borderColor = rgba(22, 120, 255, 1).CGColor;
    _rejectBtn.layer.borderWidth = 1;
    [_cellbackV addSubview:_rejectBtn];
    
    
    _agreeBtn = [[UIButton alloc]initWithFrame:CGRectMake(_cellbackV.frame.size.width-_cellbackV.frame.size.width/4-140/2, _disLab.frame.size.height+_disLab.frame.origin.y+20, 140, 35)];
    [_agreeBtn setTitle:@"同意" forState:0];
    _agreeBtn.titleLabel.textAlignment = 1;
    _agreeBtn.backgroundColor = rgba(22, 120, 255, 1);
    _agreeBtn.titleLabel.font = [UIFont systemFontOfSize:14];
    [_agreeBtn setTitleColor:rgba(255, 255, 255, 1) forState:0];
    _agreeBtn.layer.cornerRadius = 35/2;
    _agreeBtn.layer.borderColor = rgba(22, 120, 255, 1).CGColor;
    _agreeBtn.layer.borderWidth = 1;
    [_cellbackV addSubview:_agreeBtn];
    
    
    
}















- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
